package com.kaiwukj.android.ufamily.mvp.http.api.service;

import com.kaiwukj.android.ufamily.mvp.http.entity.base.BaseListResp;
import com.kaiwukj.android.ufamily.mvp.http.entity.base.BaseObjResp;
import com.kaiwukj.android.ufamily.mvp.http.entity.result.CommunityNewResult;
import com.kaiwukj.android.ufamily.mvp.http.entity.result.CommunityNoticeResult;
import com.kaiwukj.android.ufamily.mvp.http.entity.result.CommunityStatus;
import com.kaiwukj.android.ufamily.mvp.http.entity.result.ComplainResult;
import com.kaiwukj.android.ufamily.mvp.http.entity.result.GMAppointmentOrderResult;
import com.kaiwukj.android.ufamily.mvp.http.entity.result.GMOrderDetailResult;
import com.kaiwukj.android.ufamily.mvp.http.entity.result.GMOrderResult;
import com.kaiwukj.android.ufamily.mvp.http.entity.result.PropertyFeeResult;
import com.kaiwukj.android.ufamily.mvp.http.entity.result.RepairsResult;
import com.kaiwukj.android.ufamily.mvp.http.entity.result.ServiceGroupResult;
import com.kaiwukj.android.ufamily.mvp.http.entity.result.ServiceResult;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface ServiceService {


    @GET("/admin/app/service/serviceClass")
    Observable<BaseObjResp<List<ServiceGroupResult>>> fetchService();

    @GET("/admin/app/userAccount/whetherOwner")
    Observable<BaseObjResp<CommunityStatus>> whetherOwner();

    @GET("/admin/app/service/getServiceInfo")
    Observable<BaseObjResp<ServiceResult>> getServiceById(@Query("serviceId") Integer serviceId);

    @GET("/admin/app/service/listAvailableParam/{serviceId}")
    Observable<BaseObjResp<List<ServiceResult.ServiceInfo>>> getServiceInfo(@Path("serviceId") int sId);

    @POST("/estate/app/estateComplain/addEstateComplain")
    Observable<BaseObjResp<Integer>> postComplain(@Body RequestBody body);

    @GET("/estate/app/estateComplain/page")
    Observable<BaseListResp<ComplainResult>> fetchComplainList(@Query("page") Integer page,
                                                               @Query("pageSize") Integer pageSize);

    @POST("/estate/app/estateRepair/addEstateRepair")
    Observable<BaseObjResp<Integer>> postRepair(@Body RequestBody body);

    @GET("/estate/app/estateRepair/updateStatus/{id}")
    Observable<BaseObjResp<Integer>> postConfirmRepairFinish(@Path("id") int repairId);

    @POST("/estate/app/estateRepair/updateEvaluate")
    Observable<BaseObjResp<Integer>> postRepairEvaluate(@Body RequestBody body);

    @GET("/estate/app/estateRepair/page")
    Observable<BaseListResp<RepairsResult>> fetchRepairList(@Query("page") Integer page,
                                                            @Query("pageSize") Integer pageSize);

    @GET("/estate/app/feebill/list/{type}")
    Observable<BaseObjResp<List<PropertyFeeResult>>> fetchFeeBill(@Path("type") Integer type);

    @POST("/estate/app/feebill/pay")
    Observable<BaseObjResp<Map<String, Object>>> payfeeProperty(@Body RequestBody body);

    @GET("/estate/app/estateNotice/page")
    Observable<BaseListResp<CommunityNoticeResult>> fetchCommunityNotice(@Query("page") int page, @Query("pageSize") int pageSize);

    @GET("/estate/app/estateNotice/findById/{id}")
    Observable<BaseObjResp<CommunityNoticeResult>> getCommunityNoticeById(@Path("id") int id);

    @GET("/gds/app/liveDecoration/page")
    Observable<BaseListResp<GMOrderResult>> fetchGMWorkingOrder(@Query("page") Integer page,
                                                                @Query("pageSize") Integer pageSize);

    @GET("/gds/app/decorationAppointment/page")
    Observable<BaseListResp<GMAppointmentOrderResult>> fetchGMAppointmentOrder(@Query("page") Integer page,
                                                                               @Query("pageSize") Integer pageSize);

    @GET("/gds/app/liveDecoration/detail")
    Observable<BaseObjResp<GMOrderDetailResult>> getGMOrderDetail(@Query("id") Integer orderId);

    @GET("/estate/app/committee/communityArticleList")
    Observable<BaseListResp<CommunityNewResult>> fetchCommunityNewList(@Query("commId") Integer communityId);

}
